<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>CSS 动画 - 结束状态</title>
  <style>
    body {
      padding: 0 40px;
      color: #333;
    }

    .box {
      width: 200px;
      height: 100px;
      background-color: pink;

      /* forwards 的含义是指动画结束时元素的样式与 to 或 100% 帧中一致 */
      /* 其默认值为 backwards 它与 from 或 0% 一致 */
      /* animation: move 2s forwards; */

      animation-name: move;
      animation-duration: 2s;
      /* 设置动画结整时的状态 */
      animation-fill-mode: forwards;
    }

    @keyframes move {
      from {
        width: 200px;
        height: 100px;
      }

      to {
        width: 400px;
        height: 200px;
        background-color: pink;
      }
    }
  </style>
</head>
<body>
  <h3>结束状态</h3>
  <p>设置动画结束时的状态，默认恢复标签盒子本身的样式。</p>

  <div class="box"></div>
</body>
</html>